<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use Illuminate\Database\Eloquent\Builder;

use App\Http\Requests;

use App\Models\User;

class UserController extends Controller
{
    public function __construct()
    {
//        $this->middleware('auth');
    }

    public function users(Request $request)
    {
        $users = User::paginate(10);
        return view('admin.users', ['users' => $users]);
    }

    public function profile(Request $request)
    {
        $user = User::findOrFail($request->id);
        return view('user.profile',['user'=>$user]);
    }

}
